from django.conf.urls.defaults import *

urlpatterns = patterns('',

    # task
    (r'task/new/$', 'tasktracker.views.manage_tasks', {'action': 'new'}),
    (r'task/category/(?P<category_id>\d+)/$', 'tasktracker.views.manage_tasks', {'action': 'view_by_category'}),
    (r'task/(?P<task_id>\d+)/edit/$', 'tasktracker.views.manage_tasks', {'action': 'edit'}),
    (r'task/(?P<task_id>\d+)/completed/$', 'tasktracker.views.manage_tasks', {'action': 'completed'}),
    (r'task/(?P<task_id>\d+)/delete/$', 'tasktracker.views.manage_tasks', {'action': 'delete'}),
    (r'task/$', 'tasktracker.views.manage_tasks'),
    # category
    (r'category/new/$', 'tasktracker.views.manage_categories', {'action': 'new'}),
    (r'category/(?P<category_id>\d+)/edit/$', 'tasktracker.views.manage_categories', {'action': "edit"}),
    (r'category/(?P<category_id>\d+)/delete/$', 'tasktracker.views.manage_categories', {'action': 'delete'}),
    (r'category/$', 'tasktracker.views.manage_categories'),
    # task archive
    (r'archive/$', 'tasktracker.views.manage_archive'),
    # default view
    (r'$', 'tasktracker.views.manage_tasks'),

)
